home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / catD / map.z / map
Encoding:
Text File  |  1998-10-30  |  5.0 KB  |  133 lines

  1.  
  2.  
  3.  
  4. mmmmaaaapppp((((DDDD2222XXXX))))                                                              mmmmaaaapppp((((DDDD2222XXXX))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _mmmm_aaaa_pppp - support virtual mapping for memory-mapped device
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_tttt_yyyy_pppp_eeee_ssss_...._hhhh_>>>>
  13.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_mmmm_mmmm_aaaa_nnnn_...._hhhh_>>>>
  14.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_dddd_dddd_iiii_...._hhhh_>>>>
  15.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_kkkk_ssss_yyyy_ssss_////_dddd_dddd_mmmm_aaaa_pppp_...._hhhh_>>>>
  16.  
  17.      _iiii_nnnn_tttt _pppp_rrrr_eeee_ffff_iiii_xxxx_mmmm_aaaa_pppp_((((_dddd_eeee_vvvv______tttt _d_e_v_,,,, _vvvv_hhhh_aaaa_nnnn_dddd_llll______tttt _****_v_t_,,,, _oooo_ffff_ffff______tttt _o_f_f_,,,, _ssss_iiii_zzzz_eeee______tttt _l_e_n_,,,, _uuuu_iiii_nnnn_tttt _p_r_o_t_))))_;;;;
  18.  
  19.    AAAArrrrgggguuuummmmeeeennnnttttssss
  20.      _d_e_v  Device whose memory is to be mapped.
  21.  
  22.      _v_t   A pointer to the kernel-resident data structure that describes the
  23.           virtual space to which the device memory will be mapped.  The driver
  24.           needs this pointer when calling kernel service routines (i.e.,
  25.           _vvvv______mmmm_aaaa_pppp_pppp_hhhh_yyyy_ssss(D3X)).
  26.  
  27.      _o_f_f  Offset within device memory at which mapping begins.
  28.  
  29.      _l_e_n  The length (in bytes) of the device memory to be mapped into the
  30.           user's address space.
  31.  
  32.      _p_r_o_t Protection flags from _m_m_a_n._h.
  33.  
  34. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  35.      The map entry point provides a way to support drivers for memory-mapped
  36.      devices. A memory-mapped device has memory that can be mapped into a
  37.      process's address space. The _mmmm_mmmm_aaaa_pppp(2) system call allows this device
  38.      memory to be mapped into user space for direct access by the user
  39.      application (this way no kernel buffering or system call overhead is
  40.      incurred).
  41.  
  42.    RRRReeeettttuuuurrrrnnnn VVVVaaaalllluuuueeeessss
  43.      If the protection and offset are valid for the device, the driver should
  44.      return 0. Otherwise, the appropriate error number should be returned.
  45.  
  46. UUUUSSSSAAAAGGGGEEEE
  47.      This entry point is optional, and valid for memory-mapped device drivers
  48.      only.
  49.  
  50.      Valid values for _p_r_o_t are:
  51.  
  52.      _P_R_O_T__R_E_A_D
  53.           Page can be read.
  54.  
  55.      _P_R_O_T__W_R_I_T_E
  56.           Page can be written.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. mmmmaaaapppp((((DDDD2222XXXX))))                                                              mmmmaaaapppp((((DDDD2222XXXX))))
  71.  
  72.  
  73.  
  74.      _P_R_O_T__E_X_E_C
  75.           Page can be executed.
  76.  
  77.      _P_R_O_T__A_L_L
  78.           All of the above.
  79.  
  80.      The driver should treat _v_t as opaque and should not try to directly set
  81.      any of the member values.  To map physical addresses into user address
  82.      space, drivers should use the _vvvv______mmmm_aaaa_pppp_pppp_hhhh_yyyy_ssss(D3X) function. Use
  83.      _vvvv______gggg_eeee_tttt_hhhh_aaaa_nnnn_dddd_llll_eeee(D3X) if the driver must remember several virtual handles.
  84.  
  85.    SSSSyyyynnnncccchhhhrrrroooonnnniiiizzzzaaaattttiiiioooonnnn CCCCoooonnnnssssttttrrrraaaaiiiinnnnttttssss
  86.      The map routine has user context and can sleep.
  87.  
  88. RRRREEEEFFFFEEEERRRREEEENNNNCCCCEEEESSSS
  89.      _uuuu_nnnn_mmmm_aaaa_pppp(D2X), _vvvv______gggg_eeee_tttt_aaaa_dddd_dddd_rrrr(D3X), _vvvv______gggg_eeee_tttt_llll_eeee_nnnn(D3X), _vvvv______gggg_eeee_tttt_hhhh_aaaa_nnnn_dddd_llll_eeee(D3X),
  90.      _vvvv______mmmm_aaaa_pppp_pppp_hhhh_yyyy_ssss(D3X)
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.